﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace ABCNet.Orders
{
    /// <summary>
    /// 订单表
    /// </summary>
    [Table("N_Order")]
    public class Order : Abp.Domain.Entities.Auditing.AuditedEntity
    {
        /// <summary>
        /// 关联用户Id
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 收货人
        /// </summary>
        [StringLength(32)]
        public string Consignee { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        [StringLength(32)]
        public string ConsigneeTel { get; set; }
        /// <summary>
        /// 收货人地址
        /// </summary>
        [StringLength(256)]
        public string ConsigneeAddress { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public OrderStates OrderState { get; set; }

        /// <summary>
        /// 快递公司名称
        /// </summary>
        [StringLength(32)]
        public string ExpressCompanyName { get; set; }

        /// <summary>
        /// 快递单号
        /// </summary>
        [StringLength(32)]
        public string ExpressNumber { get; set; }

        /// <summary>
        /// 快递发货时间
        /// </summary>
        public DateTime? ExpressDeliveryTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime? CompletedTime { get; set; }


    }


    public enum OrderStates : int
    {
        未发货 = 0,
        已发货 = 1,
        已收货 = 2
    }

}
